<%@ page language="java" contentType="text/html;charset=UTF-8"
         pageEncoding="UTF-8" %>
<%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c" %>
<%@ taglib uri="http://java.sun.com/jsp/jstl/fmt" prefix="fmt" %>
<%@ taglib uri="http://java.sun.com/jsp/jstl/sql" prefix="sql" %>
<%@ taglib uri="http://java.sun.com/jsp/jstl/xml" prefix="x" %>
<%@ taglib uri="http://java.sun.com/jsp/jstl/functions" prefix="fn" %>
<fmt:setBundle basename="top.wsuo.message.blog"/>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
    <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
    <title><fmt:message key="picture.picture.title"/></title>
    <link rel="stylesheet" href="../static/css/uikit.min.css">
    <link rel="stylesheet" href="../static/css/uikit.gradient.min.css">
    <link rel="stylesheet" href="../static/css/awesome.css">
    <script src="../static/js/jquery.min.js"></script>
    <script src="../static/js/uikit.min.js"></script>
</head>
<body class="uk-height-1-1">
<%--使用静态包含: 顶部导航栏--%>
<%@include file="/component/header.jsp" %>
<div class="uk-container uk-container-center">
    <div class="uk-grid">
        <!-- content -->
        <!-- 配置数据源 -->
        <sql:setDataSource
                dataSource="jdbc/mysql"
                var="mysql"
                scope="request"/>
        <!-- 取得查询结果集 -->
        <sql:query sql="select * from HW_Picture "
                   dataSource="${ mysql }"
                   var="listPicture"
                   scope="request">
        </sql:query>
        <div class="uk-width-medium-3-4">
            <!-- 输出 -->
            <c:forEach var="picture" items="${ listPicture.rows }">
                <article class="uk-article">
                    <h2>
                        <a href="view.jsp?number=${ picture.number }&author=${ picture.author }">
                                ${ picture.name }
                        </a>
                    </h2>
                    <p class="uk-article-meta">${ picture.author }
                        <fmt:message key="picture.picture.upload_in"/>
                            ${ picture.create_time }
                    </p>
                    <p>
                        <a class="uk-thumbnail uk-thumbnail-small"
                           href="view.jsp?number=${ picture.number }&author=${ picture.author }">
                            <img src="showimage.do?number=${ picture.number }"></a>
                    </p>
                    <p>
                        <a href="view.jsp?number=${ picture.number }&author=${ picture.author }">
                            <fmt:message key="picture.picture.view_picture"/>
                            <i class="uk-icon-angle-double-right"></i>
                        </a>
                    </p>
                </article>
                <hr class="uk-article-divider">
            </c:forEach>
        </div>
        <!-- // content -->
    </div>
</div>
<%--底部栏目--%>
<%@include file="/component/footer.jsp" %>
</body>
</html>